// TOWN DIALOGUE SCRIPT
//    Town 127: Port Townsend

begintalkscript;

variables;

short i,j,k,r1,choice;

// Father Rice

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 1;
	question = "Father Rice";
	text1 = "A lone priest stands at the Anama altar, lost in contemplation. When you approach, he turns to you and smiles gently.";
	text2 = "_I am Father Rice of the Anama. I am here to provide guidance in this humble sanctuary. Greetings to you._";
	text5 = "Father Rice says, _The Anama welcome all into their sanctuary. How else may I help you?_";
	action = INTRO;

begintalknode;
	state = 1;
	nextstate = 2;
	question = "_Thank you for speaking with me._";
	text1 = "_It is my purpose. I provide guidance to Port Townsend. It is my holy task, and, as a priest of the Anama, I will carry it out to the fullest._";

begintalknode;
	state = 2;
	nextstate = -1;
	question = "_Tell me more about your holy task._";
	text1 = "_Life on this island is hard, and was so even before the cockroaches came. Were it not for religious fervor, most of us would have given up long ago._";

begintalknode;
	state = 2;
	nextstate = 3;
	question = "_How does Port Townsend fare?_";
	text1 = "_Port Townsend is one of the more successful villages on this island. So far, we have been only somewhat afflicted by the cockroach plagues and the diseases they bring._";
	text3 = "_Port Townsend is one of the more successful villages on this island. We were only somewhat afflicted by the cockroach plagues and the diseases they bring and, now that the creatures are going scarce, I suspect we have evaded the worst of it._";
	action = DEP_ON_SDF 307 5 0;

begintalknode;
	state = 3;
	nextstate = 4;
	question = "_Do you know anything about the cockroach plague?_";
	text1 = "_We know not why, but the fair Isle of Bigail has been beset by a mighty plague of foul and disgusting cockroaches. Fortunately, we have the Anama to guide us and to help fight the diseases they brought. The Anama lead us from Shayder._";
	text3 = "_The cockroaches are gone, but the diseases they left remained. It will take much time to recover._";
	action = DEP_ON_SDF 307 5 0;

begintalknode;
	state = 4;
	nextstate = -1;
	question = "_Where is Shayder?_";
	text1 = "_The largest city on this island and home of the Anama church. It is not far to the west._";

begintalknode;
	state = 1;
	nextstate = 5;
	question = "_How do you 'provide guidance'?_";
	text1 = "_This isle has not been settled long, and we have not achieved the level of comfort of other areas. The Anama still generally live in groups of barracks, led by one Priest or Mother who gives guidance._";
	text2 = "_We hope to be established enough that everyone can have a private home as soon as possible. Our living in barracks tends to make people think the Anama are a cult._";

begintalknode;
	state = 5;
	nextstate = -1;
	condition = has_spec_item(40) <= 0;
	question = "_So are you a cult?_";
	text1 = "_We are not a cult. Travel the island and speak with us, and I think you will find we are very level-headed. Would you like to hear some of our beliefs?_";

begintalknode;
	state = 1;
	nextstate = 6;
	question = "_Who are the Anama?_";
	text1 = "_The Anama church is the dominant force of this island. We believe that the use of magical spells in the long run brings more death and destruction than good. Would you like me to share some of my beliefs on the subject with you?_";
	text3 = "He looks down at your Anama ring, confused. _Why, your faith! I am too busy to give you a refresher, I am afraid. But don't hesitate to go to Shayder for more instruction._";
	code =
		if (has_spec_item(40) == 0)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 6;
	nextstate = -1;
	condition = has_spec_item(40) <= 0;
	question = "_Yes, tell me more about your beliefs._";
	code =
		run_hardcode(125);
	break;

begintalknode;
	state = 1;
	nextstate = -1;
	question = "_Can you heal me?_";
	text1 = "_Sadly, our resources are limited. We can't provide healing for those outside the faith._";
	text3 = "_Not here and now, I am afraid. It is all I can do to cure the diseases afflicting us here. But go to the main temple at Shayder and much help will be provided._";
	code =
		if (has_spec_item(40) == 0)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 1;
	nextstate = -1;
	question = "_Can you give me holy training?_";
	text1 = "_The Anama would be more than happy to provide you with instruction. Go to our main temple, in Shayder._";
	text3 = "_Oh, Heavens no. I am too humble to provide true instruction. Go to the main temple at Shayder and they will be happy to educate you._";
	code =
		if (has_spec_item(40) == 0)
			remove_string(3);
			else remove_string(1);
	break;

// Martha

begintalknode;
	tag = 60;
	state = -1;
	nextstate = 29;
	question = "Martha";
	text1 = "A large, bearded ogre stands by the dock, holding a roll of tickets. You think it's a female. A small cloud of flies buzzes around her. She speaks, showing huge fangs. _I called Martha. That my name. You not laugh._";
	text5 = "Martha continues to stand by the dock, holding her roll of tickets. A small cloud of flies buzzes around her.";
	action = INTRO;

begintalknode;
	state = 29;
	nextstate = -1;
	question = "_Aaaah! Aaaah! It's a monster!_";
	text1 = "Martha looks around, confused. It doesn't seem to occur to her that you meant her.";

begintalknode;
	state = 29;
	nextstate = -1;
	question = "_Martha is a stupid name for an ogre._";
	text1 = "_And you look ugly for small person. But I can change name, and you ugly for life. Hah hah hah!_";
	text2 = "She is surprisingly good-natured for an ogre.";

begintalknode;
	state = 29;
	nextstate = -1;
	question = "_I'd never laugh at you, Martha._";
	text1 = "_Good. I'm not feeling like to pound stupid adventurers to dust today._";

begintalknode;
	state = 29;
	nextstate = 30;
	question = "_What are the tickets for?_";
	text1 = "_I sell tickets to boats. I sailor, but no ships to sail on._";

begintalknode;
	state = 30;
	nextstate = 31;
	question = "_A ticket to where?_";
	text1 = "_A ticket for back to Farport is very cheap. Only ten coin. Want buy?_";

begintalknode;
	state = 31;
	nextstate = -1;
	condition = coins_amount() >= 10;
	question = "_I'd like to buy a ticket._ Pay 10 coins.";
	text1 = "She takes your coins, counting them with great difficulty. Then she tears off your tickets and hands them over. _Go to end of west dock. On boat._ She points at a boat at the end of the nearby dock.";
	text5 = "You have already bought this.";
	code =
		cs();
		if (gf(127,9) > 0)
			as(5);
			else {
				as(1);
				change_coins(-10);
				}
		sf(127,9,1);
	break;

begintalknode;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "_I don't need a ticket._";
	text1 = "_Oh. Then I got no to say to you._";
	action = END_TALK;

begintalknode;
	state = 30;
	nextstate = 32;
	question = "_Why aren't you sailing?_";
	text1 = "She grunts. _No ship for sailor like me sail for long time. Bad, bad. I live by selling tickets to small boats to boring places. And I eat roaches._";

begintalknode;
	state = 32;
	nextstate = -1;
	question = "_You eat roaches? That is disgusting._";
	text1 = "She grins. You try not to look too closely at the stuff between her fangs. _It's a living._";

